import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/view/Login/Login'
import Main from '@/view/Main'
import Home from "@/view/Home/Home";
import Layout from '@/view/Layout/Layout'
Vue.use(Router)

export default new Router({
  routes: [
    //单页面跳转
    {
      path:'/',
      component:Login
    },
    //嵌套路由
    {
      path:'/home',
      component:Layout,
      children:[
        {
          path:'',
          component:Main
        }
      ]
    }
  ]
  ,
  mode:'history' //去掉路径中的#
})
